package com.ledong.se.timer;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimerTask;

public class TestTimer extends TimerTask {
    @Override
    public void run() {
        Date d = new java.util.Date();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String dateStr = sdf.format(d);
        System.out.println("print time:" + dateStr);
    }
}
